package com.ljx.itbbs.server.article.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@TableName("tb_article_draft")
public class ArticleDraftEntity {

    @TableId(value = "id")
    @ApiModelProperty("文章草稿ID")
    @TableField("id")
    private Long id;

    @ApiModelProperty("用户ID")
    @TableField("uid")
    private Long uid;

    @ApiModelProperty("标题")
    @TableField("title")
    private String title;

    @ApiModelProperty("内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("封面")
    @TableField("cover")
    private String cover;

    @ApiModelProperty("文章板块")
    @TableField("plate_id")
    private Long plateId;

    @ApiModelProperty("文章分类")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty("文章标签")
    @TableField("tags")
    private String tags;

    @ApiModelProperty("是否含有资源（1：不存在，2：存在）")
    @TableField("contain_res")
    private Integer containRes;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty("状态（1：正常，2：下架）")
    @TableField("status")
    private Integer status;

}
